//
// Created by kepeiyang on 2021/3/8.
//

#ifndef SERVICE_NPCBEAN_H
#define SERVICE_NPCBEAN_H

#include <iostream>
#include <string>
#include <list>

using std::list;
using std::string;
/**
 * id :     id
 * area:    所处区域
 * pname：  pname
 * name：   name
 * title:   头衔
 * nickname:诨号
 * desc：   描述
 * gender： 性别
 * age：    年龄
 * combat_exp: 
 * **/


/* 基本信息 */
class NpcBean {
    string id;
    string name;
    string gender;
    string age;
    string desc;
    string combat_exp;
    string task_id;
    string greeting;
public:
    NpcBean() {}

    const string &getId() const {
        return id;
    }

    void setId(const string &id) {
        NpcBean::id = id;
    }

    const string &getName() const {
        return name;
    }

    void setName(const string &name) {
        NpcBean::name = name;
    }

    const string &getGender() const {
        return gender;
    }

    void setGender(const string &gender) {
        NpcBean::gender = gender;
    }

    const string &getAge() const {
        return age;
    }

    void setAge(const string &age) {
        NpcBean::age = age;
    }

    const string &getDesc() const {
        return desc;
    }

    void setDesc(const string &desc) {
        NpcBean::desc = desc;
    }

    const string &getExp() const {
        return combat_exp;
    }

    void setExp(const string &combat_exp) {
        NpcBean::combat_exp = combat_exp;
    }

    const string &getTaskId() const {
        return task_id;
    }

    void setTaskId(const string &task_id) {
        NpcBean::task_id = task_id;
    }

    const string &getGreeting() const {
        return greeting;
    }

    void setGreeting(const string &greeting) {
        NpcBean::greeting = greeting;
    }


    string npclist_string(list<NpcBean> npclist) {
        string out = "";

        for(NpcBean npc: npclist){
            out +=npc.toString();
            out += ",";
        }
        int pos = out.rfind(",");
        out.replace(pos,1,"");
        return out;
    }

    string toString(){
         return "{"
               "\"id\":" + id +
               ", \"name\":\"" + name + "\""
               ", \"gender\":\"" + gender + "\"" 
               ", \"age\":" + age +
               ", \"info\":\"" + desc + "\""  +
               ", \"combat_exp\":" + combat_exp +
               ", \"task_id\":" + task_id +
               ",\"greeting\":" + greeting +
               "}";
    }
};

class NpcMoreInfoBean {
    string id;
    string title;
    string nickName;

    string skill;
    string wear;
    string attitude;
    string inquiry;
    string vendor_goods;

    string shen_type;
    string _class;

public:

    const string &getId() const {
        return id;
    }

    void setId(const string &id) {
        NpcMoreInfoBean::id = id;
    }

    const string &getTitle() const {
        return title;
    }

    void setTitle(const string &title) {
        NpcMoreInfoBean::title = title;
    }

    const string &getNickName() const {
        return nickName;
    }

    void setNickName(const string &nickName) {
        NpcMoreInfoBean::nickName = nickName;
    }

    const string &getSkill() const {
        return skill;
    }

    void setSkill(const string &skill) {
        NpcMoreInfoBean::skill = skill;
    }

    const string &getWear() const {
        return wear;
    }

    void setWear(const string &wear) {
        NpcMoreInfoBean::wear = wear;
    }

    const string &getAttitude() const {
        return attitude;
    }

    void setAttitude(const string &attitude) {
        NpcMoreInfoBean::attitude = attitude;
    }

    const string &getInquiry() const {
        return inquiry;
    }

    void setInquiry(const string &inquiry) {
        NpcMoreInfoBean::inquiry = inquiry;
    }

    const string &getVendorGoods() const {
        return vendor_goods;
    }

    void setVendorGoods(const string &vendorGoods) {
        vendor_goods = vendorGoods;
    }


    const string &getShenType() const {
        return shen_type;
    }

    void setShenType(const string &shenType) {
        shen_type = shenType;
    }

    const string &getClass() const {
        return _class;
    }

    void setClass(const string & tclass) {
        _class = tclass;
    }

    NpcMoreInfoBean() {}

    string toString(){
        return "{"
               "\"id\":" + id +
               ",\"title\":\"" + title + "\""
                ",\"nickName\":\"" + nickName + "\""
                ",\"skill\":\"" + skill + "\""
                ",\"wear\":\"" + wear + "\""
               ",\"attitude\":\"" + attitude + "\""
               ",\"inquiry\":\"" + inquiry + "\""
               ",\"inquiry\":\"" + inquiry + "\""
               "}";
    }
};

#endif //SERVICE_NPCBEAN_H
